package com.jumi.microservice.dto.wdt;

import com.jumi.microservice.common.base.dto.BaseRequest;

import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

/**
 * https://open.wangdian.cn/qyb/open/apidoc/doc?path=trade_push.php
 *
 * @author Dirk
 * @Date 2020-08-18 10:19
 */
public class WdtOrderRequest extends BaseRequest {

    private static final long serialVersionUID = 551469140960117226L;

    /**
     * 原始单号
     * <p>
     * 指商城、官网等平台的订单编号，ERP称之为原始单号，同一个sid下通过本接口新增订单的tid保证唯一。
     */
    private String tid;

    /**
     * 平台状态
     * <p>
     * 订单平台状态值      状态描述
     * trade_status=10  未确认，客户只拍单未未付款(等待付款的订单,货到付款（COD）订单不需要等付款，直接进行待发货)
     * trade_status=20	待尾款(预付定金订单,等尾款付完后进入发货流程)
     * trade_status=30	已付款待发货(包含货到付款)，30只可以直接变更为70/ 80这2种状态
     * trade_status=40	部分发货(拆分发货才会出现)
     * trade_status=50	已发货(平台销售订单已经发货时推送此状态)，如果已发货在自建商城代表订单完结状态，无后续状态变更，直接推送状态值70。
     * trade_status=70	已完成（已签收），平台订单完成（客户确认收货）后，推送此状态; 订单为自动流转模式时，初次推送的平台订单状态直接就是已完成状态70
     * trade_status=80	已退款(付款后又全部退款推送此状态)
     * trade_status=90  已关闭(未付款直接取消的订单推送此状态)
     */
    private Byte tradeStatus;

    /**
     * 支付状态
     * <p>
     * 平台订单付款状态:0:未付款,1:部分付款,2:已付款
     */
    private Byte payStatus;

    /**
     * 发货条件
     * <p>
     * 1:款到发货,2:货到付款(包含部分货到付款),3:分期付款,4:挂账
     */
    private Byte deliveryTerm;

    /**
     * 下单时间
     * <p>
     * 平台订单创建时间,时间格式：yyyy-MM-dd HH:mm:ss
     */
    private Date tradeTime;

    /**
     * 支付时间--非必传
     * <p>
     * 平台订单付款时间,时间格式：yyyy-MM-dd HH:mm:ss，未付款订单为:0000-00-00 00:00:00
     */
    private Date payTime;

    /**
     * 客户网名
     * <p>
     * 平台买家昵称，注意：一次推送网名相同的订单不能超过30
     */
    private String buyerNick;

    /**
     * 支付单号--非必传
     */
    private String payId;

    /**
     * 收件人姓名
     */
    private String receiverName;

    /**
     * 省份
     * <p>
     * https://open.wangdian.cn/qyb/open/guide?path=guide_ccdmb
     */
    private String receiverProvince;

    /**
     * 城市
     */
    private String receiverCity;

    /**
     * 区县
     */
    private String receiverDistrict;

    /**
     * 地址详情
     */
    private String receiverAddress;

    /**
     * 电话号码
     */
    private String receiverMobile;

    /**
     * 物流方式
     * <p>
     * https://open.wangdian.cn/qyb/open/guide?path=guide_wlysb
     */
    private Byte logisticsType;

    /**
     * 买家备注--非必传
     */
    private String buyerMessage;

    /**
     * 邮费
     */
    private BigDecimal postAmount;

    /**
     * 货到付款金额
     */
    private BigDecimal codAmount;

    /**
     * 货到付款买家费用
     */
    private BigDecimal extCodFee;

    /**
     * 其它收费
     */
    private BigDecimal otherAmount;

    /**
     * 已付
     */
    private BigDecimal paid;

    /**
     * 订单货品明细节点
     */
    private List<WdtGoodsRequest> orderList;

    public String getTid() {
        return tid;
    }

    public void setTid(String tid) {
        this.tid = tid;
    }

    public Byte getTradeStatus() {
        return tradeStatus;
    }

    public void setTradeStatus(Byte tradeStatus) {
        this.tradeStatus = tradeStatus;
    }

    public Byte getPayStatus() {
        return payStatus;
    }

    public void setPayStatus(Byte payStatus) {
        this.payStatus = payStatus;
    }

    public Byte getDeliveryTerm() {
        return deliveryTerm;
    }

    public void setDeliveryTerm(Byte deliveryTerm) {
        this.deliveryTerm = deliveryTerm;
    }

    public Date getTradeTime() {
        return tradeTime;
    }

    public void setTradeTime(Date tradeTime) {
        this.tradeTime = tradeTime;
    }

    public Date getPayTime() {
        return payTime;
    }

    public void setPayTime(Date payTime) {
        this.payTime = payTime;
    }

    public String getBuyerNick() {
        return buyerNick;
    }

    public void setBuyerNick(String buyerNick) {
        this.buyerNick = buyerNick;
    }

    public String getPayId() {
        return payId;
    }

    public void setPayId(String payId) {
        this.payId = payId;
    }

    public String getReceiverName() {
        return receiverName;
    }

    public void setReceiverName(String receiverName) {
        this.receiverName = receiverName;
    }

    public String getReceiverProvince() {
        return receiverProvince;
    }

    public void setReceiverProvince(String receiverProvince) {
        this.receiverProvince = receiverProvince;
    }

    public String getReceiverCity() {
        return receiverCity;
    }

    public void setReceiverCity(String receiverCity) {
        this.receiverCity = receiverCity;
    }

    public String getReceiverDistrict() {
        return receiverDistrict;
    }

    public void setReceiverDistrict(String receiverDistrict) {
        this.receiverDistrict = receiverDistrict;
    }

    public String getReceiverAddress() {
        return receiverAddress;
    }

    public void setReceiverAddress(String receiverAddress) {
        this.receiverAddress = receiverAddress;
    }

    public String getReceiverMobile() {
        return receiverMobile;
    }

    public void setReceiverMobile(String receiverMobile) {
        this.receiverMobile = receiverMobile;
    }

    public Byte getLogisticsType() {
        return logisticsType;
    }

    public void setLogisticsType(Byte logisticsType) {
        this.logisticsType = logisticsType;
    }

    public String getBuyerMessage() {
        return buyerMessage;
    }

    public void setBuyerMessage(String buyerMessage) {
        this.buyerMessage = buyerMessage;
    }

    public BigDecimal getPostAmount() {
        return postAmount;
    }

    public void setPostAmount(BigDecimal postAmount) {
        this.postAmount = postAmount;
    }

    public BigDecimal getCodAmount() {
        return codAmount;
    }

    public void setCodAmount(BigDecimal codAmount) {
        this.codAmount = codAmount;
    }

    public BigDecimal getExtCodFee() {
        return extCodFee;
    }

    public void setExtCodFee(BigDecimal extCodFee) {
        this.extCodFee = extCodFee;
    }

    public BigDecimal getOtherAmount() {
        return otherAmount;
    }

    public void setOtherAmount(BigDecimal otherAmount) {
        this.otherAmount = otherAmount;
    }

    public BigDecimal getPaid() {
        return paid;
    }

    public void setPaid(BigDecimal paid) {
        this.paid = paid;
    }

    public List<WdtGoodsRequest> getOrderList() {
        return orderList;
    }

    public void setOrderList(List<WdtGoodsRequest> orderList) {
        this.orderList = orderList;
    }
}
